﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ecomerci
{
    public class customer
    {
        public string first_name { get; set; }
        public string last_name { get; set; }
        public string adress { get; set; }
        public int area_code { get; set; }
        public string city { get; set; }
        public string email { get; set; }
        public string ebay_username { get; set; }

        public customer(string Name, string Adress, string Area_code, string City, string Email, string Ebay_username)
        {
            this.first_name = splitName(Name)[0];
            this.last_name = splitName(Name)[1];
            this.adress = Adress;
            this.area_code = Convert.ToInt32(Area_code);
            this.city = City;
            this.email = Email;
            this.ebay_username = Ebay_username;
        }

        public string[] splitName(string Name)
        {
            string[] name = Name.Split(' ');
            return name;
        }
    }
}
